package com.cy;

/**
 * Created with IDEA2020.3.3 JDK1.8 Mysql 5.7 maven3.6.3
 *
 * @Auther: 张鹏宇
 * @Date: 2021/04/12/20:54
 * @Description:
 */
public class Test01 {

    public static void main(String[] args) {
        System.out.println("123");
        Zi z = new Zi();
        z.move();
        System.out.println(z.a);


        Fu f = z;
        f.move();

        z = (Zi) f;
        System.out.println(z.a);
    }
}

class Fu {
    int a = 1;

    void move() {
        a++;
    }
}

class Zi extends Fu {
    int a = 5;

    @Override
    void move() {
        a++;
    }
}